package com.biaobiaoqi.scoreanalysis.administrator.action;

import javax.annotation.Resource;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.biaobiaoqi.scoreanalysis.service.ISchoolyearService;
import com.opensymphony.xwork2.ActionSupport;

public class DeleteSchoolYear extends ActionSupport {
 	private static final long serialVersionUID = 1569062643690089079L;
 	private static final Log log = LogFactory.getLog(DeleteSchoolYear.class);
 	private int id;
 	
 	@Resource
 	private ISchoolyearService schoolyearService;
 	public String execute() {
		log.debug("delete school year:"+id);
		try {
			schoolyearService.deleteSchoolYear(id);
			return SUCCESS;
		} catch (Exception e) {
			log.error("delete school year failed", e);
			return ERROR;
		}
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public ISchoolyearService getSchoolyearService() {
		return schoolyearService;
	}
	public void setSchoolyearService(ISchoolyearService schoolyearService) {
		this.schoolyearService = schoolyearService;
	}
}
